<nb-card style="overflow-x:auto;overflow-y:hidden">
  <nb-card-header>
    教师课表查询
  </nb-card-header>

  <nb-card-body>
    <div class="form-group">
      <div>
        <input-select [ApiUrl]="'Public/TeacherList'" (myModelChange)="myModelChange($event)" [multiple]="false">
        </input-select>
      </div>
    </div>
    
    <table width="100%" *ngIf="this.bean" border="1" cellpadding="5" >
      <tr>
        <td colspan="8" style="text-align: center;">{{this.bean.name}}</td>
      </tr>
      <tr>
        <td>节数</td>
        <td>周一</td>
        <td>周二</td>
        <td>周三</td>
        <td>周四</td>
        <td>周五</td>
        <td>周六</td>
      </tr>
      <tr>
        <td>第一节</td>
        <td><span *ngIf='this.bean.courseDic["a11"].classes_name' (click)="clickCourse('a11',dialog)">{{this.bean.courseDic["a11"].classes_name}}:{{this.bean.courseDic["a11"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a12"].classes_name' (click)="clickCourse('a12',dialog)">{{this.bean.courseDic["a12"].classes_name}}:{{this.bean.courseDic["a12"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a13"].classes_name' (click)="clickCourse('a13',dialog)">{{this.bean.courseDic["a13"].classes_name}}:{{this.bean.courseDic["a13"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a14"].classes_name' (click)="clickCourse('a14',dialog)">{{this.bean.courseDic["a14"].classes_name}}:{{this.bean.courseDic["a14"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a15"].classes_name' (click)="clickCourse('a15',dialog)">{{this.bean.courseDic["a15"].classes_name}}:{{this.bean.courseDic["a15"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a16"].classes_name' (click)="clickCourse('a16',dialog)">{{this.bean.courseDic["a16"].classes_name}}:{{this.bean.courseDic["a16"].course_name}}</span></td>
      </tr>
      <tr>
        <td>第二节</td>
        <td><span *ngIf='this.bean.courseDic["a21"].classes_name' (click)="clickCourse('a21',dialog)">{{this.bean.courseDic["a21"].classes_name}}:{{this.bean.courseDic["a21"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a22"].classes_name' (click)="clickCourse('a22',dialog)">{{this.bean.courseDic["a22"].classes_name}}:{{this.bean.courseDic["a22"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a23"].classes_name' (click)="clickCourse('a23',dialog)">{{this.bean.courseDic["a23"].classes_name}}:{{this.bean.courseDic["a23"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a24"].classes_name' (click)="clickCourse('a24',dialog)">{{this.bean.courseDic["a24"].classes_name}}:{{this.bean.courseDic["a24"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a25"].classes_name' (click)="clickCourse('a25',dialog)">{{this.bean.courseDic["a25"].classes_name}}:{{this.bean.courseDic["a25"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a26"].classes_name' (click)="clickCourse('a26',dialog)">{{this.bean.courseDic["a26"].classes_name}}:{{this.bean.courseDic["a26"].course_name}}</span></td>
      </tr>
      <tr>
        <td>第三节</td>
        <td><span *ngIf='this.bean.courseDic["a31"].classes_name' (click)="clickCourse('a31',dialog)">{{this.bean.courseDic["a31"].classes_name}}:{{this.bean.courseDic["a31"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a32"].classes_name' (click)="clickCourse('a32',dialog)">{{this.bean.courseDic["a32"].classes_name}}:{{this.bean.courseDic["a32"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a33"].classes_name' (click)="clickCourse('a33',dialog)">{{this.bean.courseDic["a33"].classes_name}}:{{this.bean.courseDic["a33"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a34"].classes_name' (click)="clickCourse('a34',dialog)">{{this.bean.courseDic["a34"].classes_name}}:{{this.bean.courseDic["a34"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a35"].classes_name' (click)="clickCourse('a35',dialog)">{{this.bean.courseDic["a35"].classes_name}}:{{this.bean.courseDic["a35"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a36"].classes_name' (click)="clickCourse('a36',dialog)">{{this.bean.courseDic["a36"].classes_name}}:{{this.bean.courseDic["a36"].course_name}}</span></td>
      </tr>
      <tr>
        <td>第四节</td>
        <td><span *ngIf='this.bean.courseDic["a41"].classes_name' (click)="clickCourse('a41',dialog)">{{this.bean.courseDic["a41"].classes_name}}:{{this.bean.courseDic["a41"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a42"].classes_name' (click)="clickCourse('a42',dialog)">{{this.bean.courseDic["a42"].classes_name}}:{{this.bean.courseDic["a42"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a43"].classes_name' (click)="clickCourse('a43',dialog)">{{this.bean.courseDic["a43"].classes_name}}:{{this.bean.courseDic["a43"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a44"].classes_name' (click)="clickCourse('a44',dialog)">{{this.bean.courseDic["a44"].classes_name}}:{{this.bean.courseDic["a44"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a45"].classes_name' (click)="clickCourse('a45',dialog)">{{this.bean.courseDic["a45"].classes_name}}:{{this.bean.courseDic["a45"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a46"].classes_name' (click)="clickCourse('a46',dialog)">{{this.bean.courseDic["a46"].classes_name}}:{{this.bean.courseDic["a46"].course_name}}</span></td>
      </tr>
      <tr>
        <td>第五节</td>
        <td><span *ngIf='this.bean.courseDic["a51"].classes_name' (click)="clickCourse('a51',dialog)">{{this.bean.courseDic["a51"].classes_name}}:{{this.bean.courseDic["a51"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a52"].classes_name' (click)="clickCourse('a52',dialog)">{{this.bean.courseDic["a52"].classes_name}}:{{this.bean.courseDic["a52"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a53"].classes_name' (click)="clickCourse('a53',dialog)">{{this.bean.courseDic["a53"].classes_name}}:{{this.bean.courseDic["a53"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a54"].classes_name' (click)="clickCourse('a54',dialog)">{{this.bean.courseDic["a54"].classes_name}}:{{this.bean.courseDic["a54"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a55"].classes_name' (click)="clickCourse('a55',dialog)">{{this.bean.courseDic["a55"].classes_name}}:{{this.bean.courseDic["a55"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a56"].classes_name' (click)="clickCourse('a56',dialog)">{{this.bean.courseDic["a56"].classes_name}}:{{this.bean.courseDic["a56"].course_name}}</span></td>
      </tr>
      <tr>
        <td>第六节</td>
        <td><span *ngIf='this.bean.courseDic["a61"].classes_name' (click)="clickCourse('a61',dialog)">{{this.bean.courseDic["a61"].classes_name}}:{{this.bean.courseDic["a61"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a62"].classes_name' (click)="clickCourse('a62',dialog)">{{this.bean.courseDic["a62"].classes_name}}:{{this.bean.courseDic["a62"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a63"].classes_name' (click)="clickCourse('a63',dialog)">{{this.bean.courseDic["a63"].classes_name}}:{{this.bean.courseDic["a63"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a64"].classes_name' (click)="clickCourse('a64',dialog)">{{this.bean.courseDic["a64"].classes_name}}:{{this.bean.courseDic["a64"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a65"].classes_name' (click)="clickCourse('a65',dialog)">{{this.bean.courseDic["a65"].classes_name}}:{{this.bean.courseDic["a65"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a66"].classes_name' (click)="clickCourse('a66',dialog)">{{this.bean.courseDic["a66"].classes_name}}:{{this.bean.courseDic["a66"].course_name}}</span></td>
      </tr>
      <tr>
        <td>第七节</td>
        <td><span *ngIf='this.bean.courseDic["a71"].classes_name' (click)="clickCourse('a71',dialog)">{{this.bean.courseDic["a71"].classes_name}}:{{this.bean.courseDic["a71"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a72"].classes_name' (click)="clickCourse('a72',dialog)">{{this.bean.courseDic["a72"].classes_name}}:{{this.bean.courseDic["a72"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a73"].classes_name' (click)="clickCourse('a73',dialog)">{{this.bean.courseDic["a73"].classes_name}}:{{this.bean.courseDic["a73"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a74"].classes_name' (click)="clickCourse('a74',dialog)">{{this.bean.courseDic["a74"].classes_name}}:{{this.bean.courseDic["a74"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a75"].classes_name' (click)="clickCourse('a75',dialog)">{{this.bean.courseDic["a75"].classes_name}}:{{this.bean.courseDic["a75"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a76"].classes_name' (click)="clickCourse('a76',dialog)">{{this.bean.courseDic["a76"].classes_name}}:{{this.bean.courseDic["a76"].course_name}}</span></td>
      </tr>
      <tr>
        <td>第八节</td>
        <td><span *ngIf='this.bean.courseDic["a81"].classes_name' (click)="clickCourse('a81',dialog)">{{this.bean.courseDic["a81"].classes_name}}:{{this.bean.courseDic["a81"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a82"].classes_name' (click)="clickCourse('a82',dialog)">{{this.bean.courseDic["a82"].classes_name}}:{{this.bean.courseDic["a82"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a83"].classes_name' (click)="clickCourse('a83',dialog)">{{this.bean.courseDic["a83"].classes_name}}:{{this.bean.courseDic["a83"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a84"].classes_name' (click)="clickCourse('a84',dialog)">{{this.bean.courseDic["a84"].classes_name}}:{{this.bean.courseDic["a84"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a85"].classes_name' (click)="clickCourse('a85',dialog)">{{this.bean.courseDic["a85"].classes_name}}:{{this.bean.courseDic["a85"].course_name}}</span></td>
        <td><span *ngIf='this.bean.courseDic["a86"].classes_name' (click)="clickCourse('a86',dialog)">{{this.bean.courseDic["a86"].classes_name}}:{{this.bean.courseDic["a86"].course_name}}</span></td>
      </tr>
    </table>
  </nb-card-body>
</nb-card>


<ng-template #dialog let-data let-ref="dialogRef">
  <nb-card style="width: 200px;">
    <nb-card-header>{{ data.classes_name }}</nb-card-header>
    <nb-card-body>
    教师：{{ data.classes_name }}<br />
    课程：{{ data.course_name }}<br />
    时间：{{ data.order_num }}<br />
    场地：{{ data.address }} <a style="text-decoration:underline" >更改</a><br />
    </nb-card-body>
    <nb-card-footer>
      <button nbButton (click)="ref.close()">关闭</button>
    </nb-card-footer>
  </nb-card>
</ng-template>